<template>
	<view class="container">
		<view class="top" v-for="(item,index) in neirong" :key="index">
			<image :src="item.png" mode="widthFix"></image>
			<p class="today" @click="xianshi()">今日党史</p>
			<p class="text">{{item.content}}</p>
		</view><!--top-->
		<view class="circle">
			<p class="p1">今日步数</p>
			<p class="p2">2200</p>
		</view>
		<navigator url="../luxian/luxian2"><button type="warn">立即参与</button></navigator>
		
		
		<!-- <view class="footer"> -->
			<!-- <view class="foot"> -->
				<!-- <img src="../../static/shoye-changzheng.jpg" alt=""> -->
			<!-- </view> --><!--foot-->
			<!-- <view class="article">
				<p class="neirong">vghjvhbj</p>
				<view class="circle">
					<p class="p1">今日步数</p>
					<p class="p2">2200</p>
				</view>
				<navigator url="../luxian/luxian2"><button type="warn">立即参与</button></navigator>
			</view> -->
		<!-- </view> --><!--footer-->
		<view class="tanchuang" v-show="show">
			<p class="title">今日党史  Tue Aug 30 2022</p>
			<image src="../../static/laoshanjie.jpg" ></image>
			
			<view class="content"><p  v-for="(item,index) in qwe">{{item.content}}</p></view>
			<button type="warn" @click="xiaoshi()">确认</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show:false,
<<<<<<< HEAD
				qwe:[],
=======
				neirong:{}
>>>>>>> c816bf42a9f416d08235ff3155aadd9ec59ea9d1
			}
		},
		methods: {
			xianshi:function(){
				this.show=true
				uni.request({
					url:"http://180.76.120.179:8081/xiaochengxu/index/party",
					data:'data',
					method:'GET',
					success: (res) => {
						console.log(res.data.data)
						this.qwe = res.data.data
					},
					fail: (res) => {
						console.log('读取失败')
					}
					
				})
			},
			xiaoshi:function(){
				this.show=false
<<<<<<< HEAD
			},
			
		},
		
=======
			}
		},
		onLoad() {
			this.$http(this.$api.shouye, {})
				.then((res) => {
					console.log(res);
					this.neirong=res.data
				})
		}
>>>>>>> c816bf42a9f416d08235ff3155aadd9ec59ea9d1
	}
</script>

<style>
/* 头部图片 */  
.container{border: #f00 0px solid;}
.top image{width:100%;display:block;height:100%;}
/* 今日党史 */
.today{border:1px solid red;width:180rpx;background-color:#f00;color:#fff;padding-left:20rpx;line-height:25px;position:fixed;top:80px;right:-15px;border-radius:20px;}
/* 获取的文本内容 */
.text{margin:20px;line-height:25px;font-size:14px;text-indent:2em;}
/* 圆圈步数 */
.circle{border:5px solid red;width:180rpx;margin:0 auto;text-align:center;height:180rpx;border-radius:50%;}
.p1{margin-top:20px;color:#555;}
.p2{color:#f00;margin-top:8px;}
/* button按钮 */
<<<<<<< HEAD
button{width:300rpx;color:#fff;border-radius:8px;border:none;line-height:70rpx;font-size:15px;margin-top:15px; margin-bottom: 20px;}
=======
button{width:300rpx;color:#fff;border-radius:8px;border:none;line-height:70rpx;font-size:15px;margin-top:5px;}
>>>>>>> c816bf42a9f416d08235ff3155aadd9ec59ea9d1
/* 弹窗 */

.tanchuang{width:80%;position:fixed;top:110px;left:9%;background-color:#fff; overflow: hidden;  height: 400px;}
.title{text-align:center;background-color:#f00;line-height:50px;color:#fff;font-size:17px;}
.tanchuang image{width:80%;height:160px;margin:10px auto;display:block;}
.content{padding:0px 10px 0px 10px;font-size:13px; overflow: hidden; height: 100px;}


.tanchuang{width:80%;position:fixed;top:110px;left:9%;background-color:#fff;border-radius:5px;overflow:hidden;}
.title{text-align:center;background-color:#f00;line-height:50px;color:#fff;font-size:17px;}
.tanchuang image{width:80%;height:160px;margin:10px auto;display:block;}
.content{padding:0px 10px 0px 10px;font-size:13px;}
.tanchuang button{margin-bottom:40px;}
</style>